<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">游团信息审计</h1>
</div>
<div class="panel panel-default">
  <div class="panel-body">
    <div class="col-lg-4">
      <div class="input-group" >
        <div class="input-group-btn" >
          <span class="btn btn-default">申报企业</span>
        </div>
        <ui-select ng-model="searchform.code" theme="bootstrap">
          <ui-select-match placeholder="请选择机构..">{{$select.selected.company_name}}</ui-select-match>
          <ui-select-choices repeat="item.company_code as item in searchform.company_list | filter: $select.search">
            <span ng-bind-html="item.company_name | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
      </div>
    </div>
    <div class="col-lg-2">
      <button class="btn btn-success" ng-click="search()">立即搜索</button>
    </div>
    <div class="col-lg-2 pull-right">
      <button class="btn btn-info btn-block" ng-click="getSubsidyType()">查看补贴规则</button>
    </div>
    <div class="col-lg-2 pull-right">
      <button class="btn btn-info btn-block" ng-click="createReport()">生成审计报告</button>
    </div>
  </div>

  <div class="panel-body">

    <!-- 网络太差, 画圈等 -->
    <h3 class="col-sm-12 text-center" ng-show="searchform.loading">
      <span ng-show="groupList.length == 0"><i class="fa fa-coffee"/> 无此旅行社审计信息</span>
      <i class="fa fa-spin fa-spinner hide show inline" ng-show="groupList.length != 0"></i>
    </h3>

    <table class="table table-striped table-bordered" ng-show="!searchform.loading">
      <thead>
        <tr>
          <!-- <th class="text-center" style="width: 2%">
            <label class="i-checks m-b-none"><input type="checkbox" ng-model="info.state"><i></i></label>
          </th> -->
          <th class="col-md-1 text-center">游团名称</th>
          <th class="col-md-1 text-center">类型</th>
          <th class="col-md-1 text-center">出团时间</th>
          <th class="col-md-1 text-center">奖励人数</th>
          <th class="col-md-1 text-center">预计奖励</th>
          <th class="col-md-1 text-center">信息查询</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="info in groupList">
          <!-- <td class="text-center">
            <label class="i-checks m-b-none"><input type="checkbox" ng-model="info.state"><i></i></label>
          </td> -->
          <td class="text-center">{{info.name}}</td>
          <td class="text-center">{{info.group_num >= 3 ? '两日及多日游' : '一日游'}}</td>
          <td class="text-center">{{info.travel_time}}</td>
          <td class="text-center">{{info.domestic_num + info.foreigner_num}}</td>
          <td class="text-center">{{(info.money || 0) / 100 | currency : '￥'}}</td>
          <td class="text-center">
            <button type="button" class="btn btn-info btn-xs" ng-click="getGroupInfo(info)">游团信息</button>
            <button type="button" class="btn btn-info btn-xs" ng-click="getPersonList(info)">人员名单</button>
          </td>
        </tr>
        <tr ng-show="total.num">
          <td class="text-center" colspan="3">合计</td>
          <td class="text-center">{{total.num}}</td>
          <td class="text-center">{{total.money / 100 | currency : '￥'}}</td>
          <td class="text-center"></td>
        </tr>
      </tbody>
    </table>
  </div>

</div>
